<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>01-vue事件绑定</title>
        <!-- 引入Vue -->
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
        <!-- 准备好一个容器-->
        <div id="app">
            <button v-on:click="demo">{{str}}</button>
        </div>
    </body>

    <script type="text/javascript">
       let vm = new Vue({
        el:"#app",
        data:{
            str:"学习vue事件绑定"
        },
        methods:{
            demo(){
                console.log(this);
                alert(111)
            }
        }
       })
        console.log(vm);
    </script>
</html>